{include file="public/header" /}
<body>
<div class="x-body">
    <form action="{:url('save')}" class="layui-form" id="form">
        <input type="hidden" name="id" value="{$info.id}"/>
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                <li class="layui-this">基本信息</li>
                <li>会员身份</li>
                <!--<li>实名信息</li>-->
                <li>收款信息</li>
                {if $info.level_id>1}
               <!-- <li>时间</li>-->
                {/if}
            </ul>
            <div class="layui-tab-content">
                <!--基本信息-->
                <div class="layui-tab-item layui-show">
                    <div class="layui-form-item">
                        <label class="layui-form-label">用户名 </label>
                        <div class="layui-input-inline">
                            <input type="text" name="account" lay-verify="required" lay-reqtext="请输入用户名" placeholder="请输入用户名" value="{$info.account}" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">推荐人 </label>
                        <div class="layui-input-inline">
                            <input type="text" name="parent_code" value="{$info.parent_code}" placeholder="请输入推荐人的编号" {if $info.level_id>1 || $info.parent_code}disabled{/if} class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">手机号 </label>
                        <div class="layui-input-inline">
                            <input type="text" name="mobile" lay-verify="required" lay-reqtext="请输入手机号" placeholder="请输入手机号" value="{$info.mobile}" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">昵称 </label>
                        <div class="layui-input-inline">
                            <input type="text" name="nickname" value="{$info.nickname}" placeholder="请输入昵称" class="layui-input"/>
                        </div>
                    </div>
                    <!--<div class="layui-form-item">
                        <label class="layui-form-label">所在地区 </label>
                        <div class="layui-inline sunSelect" data-url="{:url('user/getArea')}" data-value="code" data-name="title">
                            <div class="layui-input-inline">
                                <select name="province" lay-verify="required" lay-reqtext="请选择所在省" data-name="省" data-level="1" data-id="{$info.province}" lay-filter="sunSelect"></select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="city" lay-verify="required" lay-reqtext="请选择所在市" data-name="市" data-level="2" data-id="{$info.city}" lay-filter="sunSelect"></select>
                            </div>
                            <div class="layui-input-inline">
                                <select name="district" lay-verify="required" lay-reqtext="请选择所在区/县" data-name="区/县" data-level="3" data-id="{$info.district}" lay-filter="sunSelect"></select>
                            </div>
                        </div>
                    </div>-->
                    <div class="layui-form-item">
                        <label class="layui-form-label">锁定登录</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="is_lock" value="0" title="正常" {if !$info.is_lock} checked {/if}>
                            <input type="radio" name="is_lock" value="1" title="锁定" {if $info.is_lock} checked {/if}>
                        </div>
                    </div>
                </div>

                <!--会员身份-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">会员级别 </label>
                        <div class="layui-input-inline">
                            <select name="level_id" id="level_id" lay-filter="level_id">
                                {volist name="level" id="v"}
                                <option value="{$v.id}" {if $v.id==$info.level_id}selected{/if}>{$v.title}</option>
                                {/volist}
                            </select>
                        </div>
                    </div>
                </div>

                <!--实名信息-->
                <!--<div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">是否实名</label>
                        <div class="layui-input-inline">
                            <input type="radio" name="real_status" value="1" title="是" {if $info.real_status} checked {/if}>
                            <input type="radio" name="real_status" value="0" title="否" {if !$info.real_status} checked {/if}>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">真实姓名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="real_name" value="{$info.real_name}" placeholder="请输入姓名" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">身份证号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="idcard" value="{$info.idcard}" placeholder="请输入身份证号" class="layui-input"/>
                        </div>
                    </div>
                </div>-->

                <!--收款信息-->
                <div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">微信名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="wechat_name" value="{$info.wechat_name}" placeholder="请输入微信名称" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label label-required">微信收款码</label>
                        <div class="layui-input-block">
                            <div class="layui-tab-item layui-show" style="width: 220px;">
                                <div class="layui-upload-drag uploadImage" style="padding: 10px">
                                    <i class="layui-icon"></i>
                                    <p>点击或将文件拖拽到此处</p>
                                    <div>
                                        <hr>
                                        <img src="{$info.wechat_image}" class="layui-upload-img showImage" alt="上传成功后渲染" style="max-width: 70%">
                                        <input type="hidden" name="wechat_image" value="{$info.wechat_image}" class="inpImage"/>
                                    </div>
                                </div>
                                <input class="layui-upload-file" type="file" accept="" name="file">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">支付宝名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="alipay_name" value="{$info.alipay_name}" placeholder="请输入支付宝名称" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label label-required">支付宝收款码</label>
                        <div class="layui-input-block">
                            <div class="layui-tab-item layui-show" style="width: 220px;">
                                <div class="layui-upload-drag uploadImage" style="padding: 10px">
                                    <i class="layui-icon"></i>
                                    <p>点击或将文件拖拽到此处</p>
                                    <div>
                                        <hr>
                                        <img src="{$info.alipay_image}" class="layui-upload-img showImage" alt="上传成功后渲染" style="max-width: 70%">
                                        <input type="hidden" name="alipay_image" value="{$info.alipay_image}" class="inpImage"/>
                                    </div>
                                </div>
                                <input class="layui-upload-file" type="file" accept="" name="file">
                            </div>
                        </div>
                    </div>
                    
                    <div class="layui-form-item">
                        <label class="layui-form-label">银行名称</label>
                        <div class="layui-input-inline">
                            <input type="text" name="bank_name" value="{$info.bank_name}" placeholder="请输入银行名称" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">开户行</label>
                        <div class="layui-input-inline">
                            <input type="text" name="bank_open" value="{$info.bank_open}" placeholder="请输入开户行" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">银行户名</label>
                        <div class="layui-input-inline">
                            <input type="text" name="bank_account_name" value="{$info.bank_account_name}" placeholder="请输入银行户名" class="layui-input"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">银行卡号</label>
                        <div class="layui-input-inline">
                            <input type="text" name="bank_number" value="{$info.bank_number}" placeholder="请输入银行卡号" class="layui-input"/>
                        </div>
                    </div>
                </div>

                {if $info.level_id>1}
                <!-- 续约时间 -->
                <!--<div class="layui-tab-item">
                    <div class="layui-form-item">
                        <label class="layui-form-label">续约时间</label>
                        <div class="layui-input-inline">
                            <input type="input" name="renewal_time" id="renewal_time" disabled class="layui-input" value="{neq name='$info.renewal_time' value=''}{$info.renewal_time}{/neq}" placeholder="不可设置"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">降级时间</label>
                        <div class="layui-input-inline">
                            <input type="input" name="down_time" id="down_time" disabled class="layui-input" value="{neq name='$info.down_time' value=''}{$info.down_time}{/neq}" placeholder="不可设置"/>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">到期时间</label>
                        <div class="layui-input-inline">
                            <input type="input" name="expire_time" id="expire_time" class="layui-input" value="{neq name='$info.expire_time' value=''}{$info.expire_time}{/neq}" placeholder="选择时间"/>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label">盟主到期时间</label>
                        <div class="layui-input-inline">
                            <input type="input" name="exp_leader_time_text" id="exp_leader_time_text" class="layui-input" value="{neq name='$info.exp_leader_time_text' value=''}{$info.exp_leader_time_text}{/neq}" placeholder="选择时间"/>
                        </div>
                    </div>
                </div>-->
                {/if}

            </div>
            <div class="layui-form-item" style="text-align: center;">
                <button class="layui-btn" lay-filter="save" lay-submit formObj="#form">保存</button>
            </div>
        </div>
    </form>
</div>
</body>
{include file="public/footer" /}
<script>
    layui.config({
        base: '/static/admin/js/'
    }).use(['form', 'table'], function () {
        let laydate = layui.laydate;
        laydate.render({
            type: 'datetime',
            elem: '#expire_time, #renewal_time, #down_time, #exp_leader_time_text',

        });
        form = layui.form;
        form.on('select(level_id)', function (data) {
            if (data.value == 5) {
                $('.level-bonus').show();
            } else {
                $('.level-bonus').hide();
            }
        });
    });
</script>
</html>